package cn.bon.emp.controller;

import cn.bon.common.bean.JsonResult;
import cn.bon.common.tool.R;
import cn.bon.emp.api.pojo.po.EmpJob;
import cn.bon.emp.service.IEmpJobService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author Lc_cL
 * @Date 2023/12/25
 * @Description
 */

@Tag(name = "岗位接口")
@RestController
@RequestMapping
public class JobController {
    @Resource
    IEmpJobService empJobService;

    @Operation(summary = "获取所有岗位")
    @GetMapping("/jobs")
    public JsonResult<List<EmpJob>> getAllJobs() {
        return R.success(empJobService.list());
    }
}
